<template>
	<view class="uni-back">
			<numInput :title="tableData"></numInput>
	</view>
</template>

<script>
		import {fineyineijianfa} from '../../../api/work/study.js'
	export default {
		data() {
			return {
				num: 1,
				max: 5,
				min: 0,
				tableData:[
					{title:'',
					result:'',
					userResult:''
					}
				],
				timer:{},
			};
		},
		computed: {
			  status() {  //  计算属性
			    return this.$store.state.tableStatus; //  Vuex 中定义的属性
			  }
			},
			watch:{
			  status() {
			    this.next();  //   需要调用的方法
			  }
			},
			mounted() {
				this.settimer()
			},
			methods:{
				next(){
						this.settimer()
				},
				settimer(){
					this.jiafa()
				},
				jiafa(){
					fineyineijianfa(this.num,this.max,this.min).then(resp=>{
						console.log(resp.data)
						this.tableData = resp.data
					})
				},
		
			}
		}
</script>

<style lang="scss">

</style>
